package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.base.enums.FlagEnum;
import com.ym.medical.domain.entity.DoctorGoodatEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 医生擅长对象 doctor_goodat
 *
 * @author ym
 * @date 2020-08-21
 */
@ApiModel("医生擅长-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorGoodatUpdateParam extends BeanCovert<DoctorGoodatEntity> {

	@ApiModelProperty("主键")
	@NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
	private Long id;

	@ApiModelProperty("医生ID")
	private Long doctorId;

	@ApiModelProperty("擅长")
	@Size(max = 32, message = "擅长长度超过{max}", groups = {Add.class, Update.class})
	private String goodAt;

	@ApiModelProperty("删除")
	@Size(max = 2, message = "删除长度超过{max}", groups = {Add.class, Update.class})
	@CustomConstraint(FlagEnum.class)
	private String deleted;

}
